{include file="templates/default/share/header.tpl"}

<article id="examples">
	<div class="wrapper">
		<div class="content">
			{if $status}
				<h1 class="title_img free-online-games">{$game_is_name}</h1>
				<div class="ads_728x90 mb20">{include file="templates/ads/ads_responsive.tpl"}</div>

				<ol id="breadcrumb">
			        <li class="home"><a href="/" title="{$text_home}">{$text_home}</a></li>
			        {$parrent_breadcrumb}
			        {if isset($tags_breadcrumb)}{$tags_breadcrumb}{/if}
			        <li>{$game_is_name}</li>
			    </ol>

			    <div class="button-group">
					{if !$is_mobile}
						{if $game_type == 'swf' or  $game_type == 'dcr'}
							<a href="#" id="button-plus" class="button">Zoom In (+)</a>
							<a href="#" id="button-reset" class="button danger">Actual size (x)</a>
							<a href="#" id="button-less" class="button">Zoom Out (-)</a>
						{/if}
					{/if}
					{$buttonRate}
				</div>

				{switch $game_type}
					{case 'swf'}
						<div id="mygame" style="width:{$row[0]['width']}px;height:{$row[0]['height']}px;margin:0 auto;">
							<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="gameObject">
								<param name="movie" value="{$row[0]['object']}" />
								<param name="wmode" value="direct" />
								<!--[if !IE]>-->
								<object type="application/x-shockwave-flash" data="{$row[0]['object']}" width="100%" height="100%" wmode="direct">
								<!--<![endif]-->
									<a href="http://www.adobe.com/go/getflashplayer" target="_blank">
										<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
									</a>
								<!--[if !IE]>-->
								</object>
								<!--<![endif]-->
							</object>
						</div>
					{/case}
					{case 'dcr'}
						<div id="mygame" style="width:{$row[0]['width']}px;height:{$row[0]['height']}px;margin:0 auto;">
							<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0" id="movie" width="100%" height="100%" viewastext>
								<param name="src" value="{$row[0]['object']}" />
								<param name="swStretchStyle" value="meet" />
								<param name="swRemote" value="swSaveEnabled='false' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='false'" />
								<param name="bgColor" value="#000000" />
								<embed src="{$row[0]['object']}" bgColor="#000000" width="100%" height="100%" swStretchStyle="meet" swRemote="swSaveEnabled='false' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='false'" type="application/x-director" pluginspage="http://www.macromedia.com/shockwave/download/"></embed>
							</object>
						</div>
					{/case}
					{case 'unity3d'}
						{if $is_mobile}
							<h2>Your device not support script!</h2>
						{else}
							<script type="text/javascript">
							var config = {
								width: {$row[0]['width']}, 
								height: {$row[0]['height']},
								params: {
									disableContextMenu: true,
									disableExternalCall: true,
									disableFullscreen: true,
									backgroundcolor: '108dcd',
									bordercolor: '108dcd',
									logoimage: '/static/img/front/logo.png'
								}
							};
							var u = new UnityObject2(config);
							u.observeProgress(function (progress) {
					            var $missingScreen = jQuery(progress.targetEl).find(".missing");
					            switch(progress.pluginStatus) {
					                case "unsupported":
					                    showUnsupported();
					                break;
					                case "broken":
					                    alert("You will need to restart your browser after installation.");
					                break;
					                case "missing":
					                    $missingScreen.find("a").click(function (e) {
					                        e.stopPropagation();
					                        e.preventDefault();
					                        u.installPlugin();
					                        return false;
					                    });
					                    $missingScreen.show();
					                break;
					                case "installed":
					                    $missingScreen.remove();
					                break;
					                case "first":
					                break;
					            }
					        });
							jQuery(function(){
								u.initPlugin(jQuery("#mygame")[0], "{$row[0]['object']}");
							});
							</script>
							<p class="mb20"></p>
							<div id="mygame" style="width:{$row[0]['width']}px;margin:0 auto;">
							    <div class="missing">
							        <a href="http://unity3d.com/webplayer/" target="_blank" title="Unity Web Player. Install now!">
							            <img alt="Unity Web Player. Install now!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" />
							        </a>
							    </div>
							</div>
						{/if}
					{/case}
					{default}
						<div style="width:{$row[0]['width']}px;height:{$row[0]['height']}px;margin:20px auto;">
							<iframe src="{$row[0]['object']}" width="{$row[0]['width']}" height="{$row[0]['height']}" frameborder="0" scrolling="no" style="border:none;"></iframe>
						</div>
				{/switch}
				<div class="social-likes" data-url="{$base_url}" data-title="{$game_is_name} {$title_text_game}">
					<div class="facebook" title="Share link on Facebook">Facebook</div>
					<div class="twitter" data-via="TrieuIV" title="Share link on Twitter">Twitter</div>
					<div class="plusone" title="Share link on Google+">Google+</div>
					<div class="pinterest" title="Share image on Pinterest" data-media="{rtrim($url_adress, '/')}{$row[0]['images']}">Pinterest</div>
				</div>
				<!--SIMILAR GAMES-->				
				{if !empty($similargames)}
					<h2 class="title_img similar-games">{$text-similar-games}</h2>
					<ul>
					{foreach $similargames as $key=>$value}
						<li>
							<a href="{$control_play}{$value['g_url']}.html" title="{$value['g_name']} {$title_text_game}">
								<img src="{$value['images']}" width="{$width}" height="{$height}" alt="{$value['g_name']} {$title_text_game}" />
								<h4>{$value['g_name']}</h4>
							</a>
						</li>
					{/foreach}
					</ul>
				{/if}
				{if !empty($relatedgames)}
					<h2 class="title_img related-games">{$text-related-games}</h2>
					<ul>
					{foreach $relatedgames as $key=>$value}
						<li>
							<a href="{$control_play}{$value['g_url']}.html" title="{$value['g_name']} {$title_text_game}">
								<img src="{$value['images']}" width="{$width}" height="{$height}" alt="{$value['g_name']} {$title_text_game}" />
								<h4>{$value['g_name']}</h4>
							</a>
						</li>
					{/foreach}
					</ul>
				{/if}
				<!--GAME INFOMATION-->
				<div class="about-the-game">
					<h2 class="title_img about-the-game">{$text_about_the_game}</h2>
					<div class="text">
						{if $row[0]['images']}
						<img src="{$row[0]['images']}" width="{$width}" height="{$height}" alt="{$game_is_name} {$title_text_game}" />
						{/if}
						<div class="description">{$row[0]['description']}</div>
						<h3>How to play?</h3>
						{if $row[0]['howto']}
							{$row[0]['howto']}
						{else}
							{$text_how_to_play}
						{/if}
					</div>
				</div>
				<!--Google+ Comments plugin-->
				<div id="googlepluscommentsarea" class="google-comment">
					<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>		
					<script type="text/javascript">
					var w=document.getElementById('googlepluscommentsarea').offsetWidth;
					document.write('<g:comments href="{$base_url}" width="'+w+'" first_party_property="BLOGGER" view_type="FILTERED_POSTMOD"></g:comments>');
					</script>
				</div>
			{else}
				<h1 class="title_img page-not-found">404 - Page Not Found</h1>
				<h2>{$webpage_not_found}</h2>
			{/if}
		</div>
		<div class="sidebar">
			{include file="templates/default/share/sidebar.tpl"}
		</div>
	</div>
</article>

{include file="templates/default/share/footer.tpl"}